package edu.snake.implement.factory;

import edu.snake.core.controller.command.Algorithm;
import edu.snake.implement.command.ListAlgorithm;
import edu.snake.implement.command.frog.FrogMove;
import edu.snake.implement.command.Sleep;
import edu.snake.implement.controller.character.BaseCharacterController;
import edu.snake.implement.ConfigConstant;


public class FrogAlgorithmFactory {
    public static Algorithm createFrogAlgorithm(BaseCharacterController characterController) {
        ListAlgorithm listAlgorithm = new ListAlgorithm();
        Algorithm algorithm;

        algorithm = new FrogMove(characterController);
        listAlgorithm.add(algorithm);
        algorithm = new Sleep(characterController, ConfigConstant.multiplierDelay*ConfigConstant.millisSnake);
        listAlgorithm.add(algorithm);

        return listAlgorithm;
    }
}
